<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>19.手写trim</title>
</head>

<body>
  <script>
    // 19.手写trim
    String.prototype.mytrim = function () {
      return this.replace(/^\s+/, '').replace(/\s+$/, '')
    }

    // const nums = Array.prototype.slice.call(arguments)
    
  </script>

</body>

</html>